#include "Buffer.h"

Buffer::Buffer() {
}

Buffer::~Buffer() {
}

// Functionality of thread: read always the file into empty buffer
void* Buffer::fct(void* arg) {

	Buffer* buffer = (Buffer*) arg;
	while (buffer->run()) {

	}
	pthread_exit(NULL);
}

// Start reader thread
int Buffer::startThread(pthread_t* thread, Buffer* arg) {

	if (pthread_create(thread, NULL, &Buffer::fct, (void *) arg)) {
		return EXIT_FAILURE;
	}
	return EXIT_SUCCESS;
}

bool Buffer::run() {
	return false;
}
